    $(document).ready(function(){ 
        setStyle("genres");
         
        $.mobile.loading('show');   
        var http = "http://anibox.me/api.php?task=get_genres&"+getUpdateRequest();
        $.getJSON(http, parseJson);
        
    });  
    
    function parseJson(data){
        for (var i in data) {
            $('#list').append(
                '<li>' +
                '<div class="div_style_update" id="' + i + '" onClick="liOnClick(this.id);">'+
                 data[i] +
                 '</div>'+
                '</li>\n'
            );
        }
        $('#list').listview('refresh');
        $.mobile.loading('hide');
    }
    
    //click list element in ul
    function liOnClick(id){
        var value = document.getElementById(id).innerHTML;
        var types = getParam("types");
        window.location = "works.html?genres="+value+"&types="+types;
    }
